/*******************************************************************************

ATTENTION, this is an altered version of the xhtml_gen library, specifically tailored to libwebconf's needs please refer to the original library

xhtml_gen: xhtml generation library.
Copyright (c) 2006  Mitchel Haas

This software is provided 'as-is', without any express or implied warranty. 
In no event will the author be held liable for any damages arising from 
the use of this software.

Permission is granted to anyone to use this software for any purpose, 
including commercial applications, and to alter it and redistribute it freely, 
subject to the following restrictions:

1.	The origin of this software must not be misrepresented; 
you must not claim that you wrote the original software. 
If you use this software in a product, an acknowledgment in the product 
documentation would be appreciated but is not required.

2.	Altered source versions must be plainly marked as such, 
and must not be misrepresented as being the original software.

3.	The above copyright notice and this permission notice may not be removed 
or altered from any source distribution.

For complete documentation on this library, see http://www.datasoftsolutions.net
Email questions, comments or suggestions to mhaas@datasoftsolutions.net
*******************************************************************************/
#pragma once
#include <vector>
#include <set>
#include "xhtml_def.hpp"
#include "tag_trait.hpp"

namespace xhtml_gen
{
// forward declarations
class tag_trait;

class tag;

class tag_trait_manager
{
public:
	// constructors/destructor
	tag_trait_manager();
	~tag_trait_manager();

public:
	// interface
	const tag_trait* get_tag_trait(xhtml_strict _tag) const;
	friend class tag;

private:
	// don't allow copying or assignment
	tag_trait_manager& operator =(const tag_trait_manager& rhs);
	tag_trait_manager(const tag_trait_manager& _src);



	std::set<attribute> populate_attribs(const attribute* const pAttr, const int count);
	std::set<xhtml_strict> populate_nested_tags(const xhtml_strict* const pTags, const int count);

	void create_a();
	void create_abbr();
	void create_acronym();
	void create_address();
	void create_applet();
	void create_area();
	void create_b();
	void create_base();
	void create_basefont();
	void create_bdo();
	void create_big();
	void create_blockquote();
	void create_body();
	void create_br();
	void create_button();
	void create_caption();
	void create_center();
	void create_cite();
	void create_code();
	void create_col();
	void create_colgroup();
	void create_dd();
	void create_del();
	void create_dfn();
	void create_dir();
	void create_div();
	void create_dl();
	void create_dt();
	void create_em();
	void create_fieldset();
	void create_font();
	void create_form();
	void create_frame();
	void create_frameset();
	void create_h1();
	void create_h2();
	void create_h3();
	void create_h4();
	void create_h5();
	void create_h6();
	void create_head();
	void create_hr();
	void create_html();
	void create_i();
	void create_iframe();
	void create_img();
	void create_input();
	void create_ins();
	void create_isindex();
	void create_kbd();
	void create_label();
	void create_legend();
	void create_li();
	void create_link();
	void create_map();
	void create_menu();
	void create_meta();
	void create_noframes();
	void create_noscript();
	void create_object();
	void create_ol();
	void create_optgroup();
	void create_option();
	void create_p();
	void create_param();
	void create_pre();
	void create_q();
	void create_s();
	void create_samp();
	void create_script();
	void create_select();
	void create_small();
	void create_span();
	void create_strike();
	void create_strong();
	void create_style();
	void create_sub();
	void create_sup();
	void create_table();
	void create_tbody();
	void create_td();
	void create_textarea();
	void create_tfoot();
	void create_th();
	void create_thead();
	void create_title();
	void create_tr();
	void create_tt();
	void create_u();
	void create_ul();
	void create_var();



private:
	// data
	std::vector<tag_trait*> tag_trait_vec;
};


}

